/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

/**
 *
 * @author Long
 */
public class Position {
    private int x;
    private int y;
    public Position(int x,int y){
        this.x = x;
        this.y = y;
    }
    public Position(String s){
        String token[] = s.split(" ");
        if(token.length == 2){
            try{
            this.x = Integer.parseInt(token[0]);
            this.y = Integer.parseInt(token[1]);
            }catch(NumberFormatException nfe){
                nfe.printStackTrace();
            }
        }
    }
    public int getX(){
        return x;
    }
    public int getY(){
        return y;
    }
}
